<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1.0, user-scalable=0">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>卖出</title>

    <!-- Bootstrap -->
    <link href="bootstrap-3.3.5-dist/css/bootstrap.css" rel="stylesheet">
    <link href="bootstrap-3.3.5-dist/css/sold.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
  <div>

    <!-- Nav tabs -->
    <ul class="nav nav-tabs" role="tablist">
      <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">黄金</a></li>
      <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">白银</a></li>
    </ul>

    <!-- Tab panes -->
    <div class="tab-content">
      <div role="tabpanel" class="tab-pane active" id="home">
          <div class="container">
            <div class="row">
              <div class="col-md-12">
                    <div class="sold">卖出价格
                        <div class="sold_price">
                        <span class="sold_price_number">236.0</span>元/克
                        </div>
                    </div>

              </div>
              <form>
                  <div class="col-md-12">
                        <div class="sold_number">卖出数量
                        <input class="password1" type="number" placeholder="最大可卖出200手"  oninput="button_change (event)">
                        </div>
                  </div>
                  <button type="submit"  class="sure">卖 出</button>
              </form>
            </div>
          </div>
      </div>
      <div role="tabpanel" class="tab-pane" id="profile">
          <div class="container">
            <div class="row">
              <div class="col-md-12">
                    <div class="sold">卖出价格
                        <div class="sold_price">
                        <span class="sold_price_number">66.0</span>元/克
                        </div>
                    </div>

              </div>
              <form>
                  <div class="col-md-12">
                        <div class="sold_number">卖出数量
                        <input class="password1" type="number" placeholder="最大可卖出200手"  oninput="button_change (event)">
                        </div>
                  </div>
                  <button type="submit"  class="sure">卖 出</button>
              </form>
            </div>
          </div>
      </div>
    </div>

  </div>
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="js/jquery-1.11.3.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="bootstrap-3.3.5-dist/js/bootstrap.min.js"></script>
    <script type="text/javascript">
    $(function() { 
        $('.sure').attr("disabled", true);
        // var password1 = $('.password1').val();            
    });
    /*全部选项都填好了button才可以点击*/
    function button_change (event) {
        var password1 = $('.password1').val(); 
        if(password1=="")
        {
          $('.sure').attr("disabled", "disabled");
        }else{
          $('.sure').attr("disabled", false);
          $(".sure").css("background-color","#f5a002");
        }
    }
    </script>
  </body>
</html>